package com.yang.leather.common.upload;

public enum ImageUploadType {
	LOGO(1,"logo"),
	LINK_LOGO(2,"link"),//link logo
	PHONE(3,"phone"),//电话
	AD(4,"ad"),//广告
	ACTIVITY(5,"activity"),//活动
	PRODUCT(6,"prod"),//商品图片
	PROD_DETAIL(7,"prodxq"),//商品详情
	CULTRUE(8,"cultrue"),//资讯
	CULTRUE_DETAIL(9,"cxq"),//资讯详细
	HELP(10,"help"),//帮助
	;
	
	private Integer typeId;
	
	private String type;
	
	private ImageUploadType(Integer typeId,String type){
		this.typeId = typeId;
		this.type = type;
	}
	
	public String getType() {
		return type;
	}

	public Integer getTypeId() {
		return typeId;
	}
	
	public ImageUploadType getType(String type){
		for(ImageUploadType t : ImageUploadType.values()){
			if(t.getType().equals(type)){
				return t;
			}
		}
		return null;
	}
}
